package com.incar.chuxing.activity.certification;

import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.view.View;

import com.incar.chuxing.R;
import com.incar.chuxing.activity.MainActivity;
import com.incar.chuxing.base.BaseActivity;
import com.incar.chuxing.utils.AppManager;

import butterknife.BindView;


/**
 * 身份认证审核中
 */
public class CertifyCardInActivity extends BaseActivity {

    @BindView(R.id.toolbar)
    Toolbar toolbar;
    private Context mContext = this;
    private String fromType;

    @Override

    public int getLayoutId() {
        return R.layout.activity_card_in;
    }


    @Override
    public void initData() {
        super.initData();
    }

    @Override
    public void initView() {
        fromType = getIntent().getStringExtra("fromType") + "";
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });

    }

    @Override
    public void onBackPressed() {
        if (fromType.equals("authFlow") || fromType.equals("fromNewUser")) {
            startActivity(new Intent(mContext, MainActivity.class));
            AppManager.getAppManager().finishActivity();
        } else {
            AppManager.getAppManager().finishActivity();
        }
    }

}
